/*
 * Maze.h
 *
 *  Created on: 23.11.2011
 *      Author: jan
 */

#ifndef MAZE_H_
#define MAZE_H_

#include <opencv/cv.h>
#include <opencv/highgui.h>
#include <cmath>
#include <cstdlib>
#include <vector>
#include <iostream>
#include "Point.h"
#include "MathUtil.h"
#include "AbstractMap.h"

namespace std {

class Maze : public AbstractMap<int>{
public:
	int update_cnt;
	vector<Point> beacons;
	vector<Point> blocks;

	bool imageShown;
	int wDiff;
	int hDiff;

	Maze(int date[], int h, int w, int picWidth, int picHeight);
	virtual ~Maze();

	//virtual fkts
	virtual Point random_free_place();
	virtual bool is_in(Point p);
	virtual bool is_free(Point p);
	virtual double distance_to_nearest_beacon(Point p);
	//end virtual fkts

	void draw();
	void redraw();
	void repaint();
	void drawRobot(Point r);
	void drawParticles(Point p);
	void releaseImage();
	Point random_place();
	double read_sensor();
	static double distance(Point p1, Point p2);

};

} /* namespace std */
#endif /* MAZE_H_ */
